package client.view;

import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;

public class FreeformLayout implements java.awt.LayoutManager
{

	public void addLayoutComponent(String arg0, Component arg1) {
	}

	public void removeLayoutComponent(Component arg0) {
	}

	public Dimension preferredLayoutSize(Container arg0) {
		int xMax = 0, yMax = 0;
		for (Component c : arg0.getComponents()) {
			if (c.getX() + c.getWidth() > xMax)
				xMax = c.getX() + c.getWidth();
			if (c.getY() + c.getHeight() > yMax)
				yMax = c.getY() + c.getHeight();
		}
		return new Dimension(xMax, yMax);
	}

	public Dimension minimumLayoutSize(Container arg0) {
		return new Dimension(0,0);
	}

	public void layoutContainer(Container arg0) {
	}
}